import {defineStore} from "pinia";
import {ref} from "vue";

export const useTenantInfoStore = defineStore('tenantInfo', () => {
    let tenantSearchData = ref({});
    let tenantDataList = ref([]);
    let addOrUpdateDialog = ref(false);
    let tenantDeleteDialog = ref(false);

    function resetTenantSearchData(info) {
        tenantSearchData.value = info;
    }

    function resetTenantDataList(info) {
        tenantDataList.value = info;
    }

    function resetAddOrUpdateDialog(flag) {
        addOrUpdateDialog.value = flag;
    }

    function resetTenantDeleteDialog(flag) {
        tenantDeleteDialog.value = flag;
    }


    return { tenantSearchData, resetTenantSearchData, tenantDataList, resetTenantDataList, addOrUpdateDialog, resetAddOrUpdateDialog,
        tenantDeleteDialog, resetTenantDeleteDialog }
})